package com.netease.c.b;

import com.netease.c.f;
import com.netease.c.q;
import com.netease.framework.a.b;
import java.io.UnsupportedEncodingException;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.http.HttpEntity;

public class a
{
  public static final String a = "1.0";
  public static final String b = "utf-8";
  public static final String c = "oauth_consumer_key";
  public static final String d = "oauth_token";
  public static final String e = "oauth_token_secret";
  public static final String f = "oauth_signature_method";
  public static final String g = "oauth_signature";
  public static final String h = "oauth_timestamp";
  public static final String i = "oauth_nonce";
  public static final String j = "oauth_version";
  public static final String k = "oauth_callback";
  public static final String l = "oauth_callback_confirmed";
  public static final String m = "oauth_verifier";
  public static final String n = "Authorization";
  public static final String o = "HMAC-SHA1";
  public static final String p = "OAuth";
  private static final String q = "application/x-www-form-urlencoded";
  private static String r = "utf-8";

  public static c a(b paramb, String paramString, Hashtable paramHashtable, d paramd)
  {
    return a(paramb, paramString, paramHashtable, null, paramd);
  }

  public static c a(b paramb, String paramString, Hashtable paramHashtable, HttpEntity paramHttpEntity, d paramd)
  {
    if (paramb == null)
      paramb = b.a;
    c localc = new c(paramString, paramb, paramd);
    if (paramHashtable != null)
    {
      Iterator localIterator = paramHashtable.entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        localc.a((String)localEntry.getKey(), (String)localEntry.getValue());
      }
    }
    localc.a(paramHttpEntity);
    return localc;
  }

  public static String a(String paramString)
  {
    if (paramString == null);
    for (String str = ""; ; str = q.b(paramString, "utf-8"))
      return str;
  }

  protected static void a(Hashtable paramHashtable, String paramString1, String paramString2)
  {
    paramHashtable.put(paramString1, paramString2);
  }

  public static String b(String paramString)
  {
    try
    {
      String str = f.a(paramString, "utf-8");
      return str;
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
    }
    throw new RuntimeException(localUnsupportedEncodingException.getMessage());
  }

  public static byte[] c(String paramString)
  {
    if (r != null);
    while (true)
    {
      try
      {
        byte[] arrayOfByte2 = paramString.getBytes(r);
        arrayOfByte1 = arrayOfByte2;
        return arrayOfByte1;
      }
      catch (UnsupportedEncodingException localUnsupportedEncodingException)
      {
        localUnsupportedEncodingException.printStackTrace();
      }
      byte[] arrayOfByte1 = paramString.getBytes();
    }
  }

  protected static String d(String paramString)
  {
    int i1 = paramString.indexOf(":");
    String str3;
    int i4;
    int i5;
    String str2;
    String str1;
    if (i1 > 0)
    {
      str3 = paramString.substring(0, i1);
      int i3 = paramString.indexOf("//");
      if (i3 > 0)
      {
        i4 = i3 + "//".length();
        i5 = paramString.indexOf("/", i4);
        if (i5 > 0)
        {
          str2 = paramString.substring(i4, i5);
          int i6 = paramString.indexOf("?", i5);
          if (i6 > 0)
            str1 = paramString.substring(i5, i6);
        }
      }
    }
    while (true)
    {
      int i2;
      if ((str3 != null) && (str2 != null))
      {
        i2 = str2.indexOf(":");
        if (i2 <= 0)
          break label247;
        String str6 = str2.substring(i2 + 1);
        if (((!str3.equals("http")) || (!str6.equals("80"))) && ((!str3.equals("https")) || (!str6.equals("443"))))
          break label247;
      }
      label247: for (String str5 = str2.substring(0, i2); ; str5 = str2)
      {
        if ((str1 == null) || (str1.length() == 0))
          str1 = "/";
        for (String str4 = str3 + "://" + str5 + str1; ; str4 = null)
        {
          return str4;
          str1 = paramString.substring(i5);
          break;
          str2 = paramString.substring(i4);
          str1 = null;
          break;
        }
      }
      str1 = null;
      str2 = null;
      continue;
      str1 = null;
      str2 = null;
      str3 = null;
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.c.b.a
 * JD-Core Version:    0.6.0
 */